﻿<header class="action-bar">
    <a href="javascript: history.back();" class="app-icon action up" data-transition="pop">
        <i class="icon-up-button"></i>
        <i class="icon-edit"></i>
    </a>
    <h1 class="title">Task</h1>
    <ul class="actions pull-right">
        <li>
            <a ng-click="editTaskCtrl.saveTask()" class="action" title="Save">
                <i class="icon-save"></i>
            </a>
        </li>
    </ul>
</header>
<div class="content">
    <form class="inset">
        <label class="block-label">TASK ID</label>
        <span class="input-pretty">
            <input type="number" placeholder="Task Id" class="input-text" ng-model="editTaskCtrl.task.id" />
        </span>
        <label class="block-label">TITLE</label>
        <span class="input-pretty">
            <input type="text" placeholder="Title" class="input-text" ng-model="editTaskCtrl.task.title" />
        </span>
        <label class="block-label">WORK TIME</label>
        <div class="flex-group">
            <span class="flex1 input-pretty">
                <input type="number" placeholder="Estimated" class="input-text" ng-model="editTaskCtrl.task.estimatedWork" />
            </span>
            <span class="flex1 input-pretty">
                <input type="number" placeholder="Remaining" class="input-text" ng-model="editTaskCtrl.task.remainingWork" />
            </span>
            <span class="flex1 input-pretty">
                <input type="number" placeholder="Completed" class="input-text" ng-model="editTaskCtrl.task.completedWork" />
            </span>
        </div>        
        <label class="block-label">STORY</label>
        <div class="form-spinner">
            <a class="toggle-spinner" ng-click="editTaskCtrl.showStories()">
                {{ editTaskCtrl.getSelectedStoryTitle() }}
            </a>
            <ul class="spinner" ng-class="{ 'active': editTaskCtrl.isShowingStories }" ng-show="editTaskCtrl.isShowingStories">
                <li class="spinner-item" ng-repeat="story in editTaskCtrl.availableStories">
                    <a ng-click="editTaskCtrl.setUserStory(story)">{{ story.title }}</a>
                </li>
            </ul>
        </div>
    </form>
</div>
